package com.yili.oa.dao;

import com.yili.oa.models.FtGamePlatform;
import com.yili.oa.models.FtGamePlatformExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface FtGamePlatformMapper {
    @SelectProvider(type=FtGamePlatformSqlProvider.class, method="countByExample")
    long countByExample(FtGamePlatformExample example);

    @DeleteProvider(type=FtGamePlatformSqlProvider.class, method="deleteByExample")
    int deleteByExample(FtGamePlatformExample example);

    @Delete({
        "delete from ft_game_platform",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long id);

    @Insert({
        "insert into ft_game_platform (id, game_platform, ",
        "game_kind)",
        "values (#{id,jdbcType=BIGINT}, #{gamePlatform,jdbcType=VARCHAR}, ",
        "#{gameKind,jdbcType=BIGINT})"
    })
    int insert(FtGamePlatform record);

    @InsertProvider(type=FtGamePlatformSqlProvider.class, method="insertSelective")
    int insertSelective(FtGamePlatform record);

    @SelectProvider(type=FtGamePlatformSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="game_platform", property="gamePlatform", jdbcType=JdbcType.VARCHAR),
        @Result(column="game_kind", property="gameKind", jdbcType=JdbcType.BIGINT)
    })
    List<FtGamePlatform> selectByExample(FtGamePlatformExample example);

    @Select({
        "select",
        "id, game_platform, game_kind",
        "from ft_game_platform",
        "where id = #{id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="game_platform", property="gamePlatform", jdbcType=JdbcType.VARCHAR),
        @Result(column="game_kind", property="gameKind", jdbcType=JdbcType.BIGINT)
    })
    FtGamePlatform selectByPrimaryKey(Long id);

    @UpdateProvider(type=FtGamePlatformSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") FtGamePlatform record, @Param("example") FtGamePlatformExample example);

    @UpdateProvider(type=FtGamePlatformSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") FtGamePlatform record, @Param("example") FtGamePlatformExample example);

    @UpdateProvider(type=FtGamePlatformSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(FtGamePlatform record);

    @Update({
        "update ft_game_platform",
        "set game_platform = #{gamePlatform,jdbcType=VARCHAR},",
          "game_kind = #{gameKind,jdbcType=BIGINT}",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(FtGamePlatform record);
}